package org.example.dao.impl;


import org.example.dao.BookDao;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

@Component@Repository
//默认是单例
@Scope
public class BookDaoimpl implements BookDao {

    public void save(){
        System.out.println("book save");
    }
@PostConstruct     //版本问题后期已经没了
    public void init(){
        System.out.println("book init");
    }
@PreDestroy
    public void destroy(){
        System.out.println("book destroy");
    }




}
